//
// Created by Thinkpad on 2025/11/9.
//


#include <iostream>
using namespace std;

template <int threshold,typename T>
bool is_valid(T collection[],size_t size) {
    T sum{};
    for (size_t i{ 0 };i < size;i++) {
        sum += collection[i];
    }
    return (sum > threshold) ? true : false;
}

int main() {
    double temperatures []{10.0,20.0,30.0,40.0,50.0};
    bool valid = is_valid<200,double>(temperatures,size(temperatures));
    cout << "boolalpha " << "valid: " << valid << endl;
    return 0;
}

